@extends('Admin.layout.layout')
 @section('title')
    <title>文章修改</title>
    <script type="text/javascript" charset="utf-8" src="{{asset('/public/ueditor1_4_3_3-utf8-php/utf8-php/ueditor.config.js')}}"></script>
    <script type="text/javascript" charset="utf-8" src="{{asset('/public/ueditor1_4_3_3-utf8-php/utf8-php/ueditor.all.min.js')}}"> </script>
    
    <script type="text/javascript" charset="utf-8" src="{{asset('/public/ueditor1_4_3_3-utf8-php/utf8-php/lang/zh-cn/zh-cn.jsSS')}}"></script>
    @show
@section('con')
<div class="row"> 
   <div class="col-lg-12"> 
    <h1 class="page-header">文章修改</h1> 
   </div> 
   <!-- /.col-lg-12 --> 
  </div> 
  <!-- /.row --> 
  <div class="row"> 
   <div class="col-lg-12"> 
    <div class="panel panel-default"> 
     <div class="panel-heading">
      
     </div> 
     <div class="row">
     <div class="col-md-4 col-md-offset-4">
             @if (count($errors) > 0)
          <div class="alert alert-danger">
              <ul>
                  @foreach ($errors->all() as $error)
                      <li>{{ $error }}</li>
                  @endforeach
              </ul>
          </div>
           @endif
      </div>      
     </div> 
     <div class="panel-body"> 
      <div class="row col-xd-4 col-xd-offset-4"> 
       <div class="col-md-6 col-md-offset-3">
      
       <div class="col-md-6 col-md-offset-3">
      
        <form role="form" action="{{url('/admin/artl/update')}}" method="post"> 
      <div class="row col-xd-6 col-xd-offset-1"> 
       <div class="col-md-8 col-md-offset-2">
      
       <div class="col-md-12 col-md-offset-1">
      
        <form role="form" action="{{url('/admin/artl/update')}}" method="post" enctype="multipart/form-data"> 
         
        <div class="form-group">
        @if($data->status == 1)
        <label>当前文章状态————显示</label>
        @elseif($data->status == 0)
        <label>当前文章状态————未显示</label>
        @endif        
        </div>
        <div class="form-group">
        <label>文章状态</label>
        <select class="form-control" name="status">
            <option selected >选择文章状态</option>
            <option value="1">展示</option>
            <option value="0">不展示</option>
        </select>
        </div>
        <div class="form-group"> 
          <label>文章标题</label> 
          <input class="form-control" name="title" value="{{$data->title}}" /> 
        </div class="row col-md-6 col-offset-3"> 
        <div class="form-group"> 
          <label>文章原作者</label> 
          <input class="form-control" name="author" value="{{$data->pauthor}}" /> 
        </div class="row col-md-6 col-offset-3"> 
        <div class="form-group"> 
          <label>文章发布者</label> 
          <input class="form-control" name="pauthor" value="{{$data->author}}" /> 
        </div class="row col-md-6 col-offset-3">
        <script id="editor" name="content"   type="text/plain" style="width:500px;">{!! $data->content !!}</script>
        <div class="form-group"> 
          <label>文章展示图</label> 
          <img src="{{$data->pic}}" width="200px" height="180px">
          <br>
          <br>
          <input  name="pic" type="file"  value="{{$data->pic}}"/> 
        </div class="row col-md-6 col-offset-3">
        <div class="form-group"> 
          <label>文章简介</label> 
          <textarea name="cont" id="" cols="87" rows="5">{{$data->cont}}</textarea>
        </div class="row col-md-6 col-offset-3">
        <label>文章内容</label>
        <script id="editor" name="content"   type="text/plain" style="width:700px;height:500px">{!! $data->content !!}</script>
          <input type="hidden" name="id" value="{{$data->id}}">
        <button class="btn btn-success" type="submit">确定</button>
         {{csrf_field()}}
         
        </form>
         <div class="form-group"> 
         </div>  
       <!-- /.col-lg-6 (nested) --> 
       </div>
       </div>
      </div> 
      <!-- /.row (nested) --> 
     </div> 
     <!-- /.panel-body --> 
    </div> 
    <!-- /.panel --> 
   </div> 
   <!-- /.col-lg-12 --> 
  </div> 
  <!-- /.row --> 

           


@endsection
@section('js')
    <script type="text/javascript">
   
        var ue = UE.getEditor('editor');

    </script>
@endsection